<template>
  <div class="item">
    <div>{{props.data.Homework!.name}}</div>
    <div :onClick="pushRouter">查看</div>
  </div>
</template>
<script lang="ts" setup>
import {ref, defineProps} from "vue"
import {useRouter} from "vue-router"
import {Job} from "../interface"
const router = useRouter()
const props = defineProps<{
  data: Job
}>()
const pushRouter = () => {
  router.push({
    name: "WritingHomeworkView",
    query: {
      id: props.data.homeworks_id,
      type: "home"
    }
  })
}
</script>
<style lang="scss" scoped>
.item {
  margin: 0 auto;
  border: 1px solid #ccc;
  width: 500px;
  height: 50px;
  border-radius: 18px;
  display: flex;
  justify-content: space-between;
  padding: 0 50px;
  align-items: center;
}
</style>
